#pragma once
#include <math.h>
#include <string>
#include <sstream>

using namespace std;

class Point {

private:
        int xVal, yVal;
public:

	Point(int x, int y)
	{
		xVal = x;
		yVal = y;
	}


	Point operator+(Point p) const 
	{
		return Point(xVal + p.xVal, yVal + p.yVal);
	}

	Point operator-(Point p) const 
	{
		return Point(xVal - p.xVal, yVal - p.yVal);
	}


	int X()
	{
		return xVal;
	}

	int Y()
	{
		return yVal;
	}


	double Distance(Point other)
	{
		double xd = xVal - other.xVal;
		double yd = yVal - other.yVal;
		return sqrt(xd*xd + yd*yd);
	}

	Point Add(Point p)
	{
		return Point(xVal + p.xVal, yVal + p.yVal);
	}

	Point Sub(Point p)
	{
		return Point(xVal - p.xVal, yVal - p.yVal);
	}

	Point Multiply(Point p)
	{
		return Point(xVal * p.xVal, yVal * p.yVal);
	}

	string ToString()
	{
	   ostringstream s;
	   s << "X: ";
	   s << xVal;
	   s << "  Y: ";
	   s << yVal;
	   return s.str();
	}
};